package youcaihuaoa.weetop.com.ui.login

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.blankj.utilcode.util.ColorUtils
import com.blankj.utilcode.util.SpanUtils
import com.blankj.utilcode.util.StringUtils
import com.robot.base.base.activity.GLBaseActivity
import com.robot.base.configs.AppConstants
import com.robot.base.util.ToastUtils
import com.robot.base.util.arouter.ARouterUtil
import youcaihuaoa.weetop.com.BR
import youcaihuaoa.weetop.com.R
import youcaihuaoa.weetop.com.databinding.AppActivityForgetPasswordBinding
import youcaihuaoa.weetop.com.vm.login.ForgetPasswordViewModel

@Route(path = AppConstants.Router.Main.A_FORGET_PASSWORD)
class ForgetPasswordActivity :
    GLBaseActivity<AppActivityForgetPasswordBinding, ForgetPasswordViewModel>() {

    override fun initComponents() {
        addSingleTitleBar("重置密码")
        setViewData()
    }

    private fun setViewData() {
        SpanUtils.with(binding.tvPrompt)
            .append(StringUtils.getString(R.string.app_en_tips_7))
            .append(StringUtils.getString(R.string.app_en_tips_8))
            .setClickSpan(ColorUtils.getColor(R.color._57B3FF), false) {
                ToastUtils.showShort("点击了用户服务协议")
            }
            .append(StringUtils.getString(R.string.app_en_tips_10))
            .append(StringUtils.getString(R.string.app_en_tips_9))
            .setClickSpan(ColorUtils.getColor(R.color._57B3FF), false) {
                ToastUtils.showShort("点击了隐私条款")
            }
            .create()
    }

    override fun initContentView(savedInstanceState: Bundle?): Int =
        R.layout.app_activity_forget_password

    override fun initVariableId(): Int = BR.viewModel
}